<!DOCTYPE html>
<html>
    
    <title>${messages.page.technology.add}</title>
    
    <p><a href="/technology">&larr; Back to List</a></p>

    <form action="/technology" method="post" enctype="multipart/form-data" data-ajax-validation="true">

        <h1>${messages.page.technology.add}</h1>
        
        <fieldset data-legend="General information:">
            <input type="text" value="${technology.name}" size="48" data-label="Name:" />
            <input type="text" value="${technology.homepage}" size="48" data-label="Homepage:" />
            <input type="text" value="${technology.version}" size="16" data-label="Version:" />
        </fieldset>
        
        <fieldset data-legend="Description:">
            <textarea cols="60" rows="10" data-error="true">${technology.description}</textarea>
        </fieldset>
        
        <fieldset data-legend="Image:">
            <img src="/technology/image/${technology.value}" alt="${technology.name}" width="128" height="128" 
                data-rendered="${not empty technology and not empty technology.value and not empty technology.image}" />
            <input id="image" type="file" data-error="true" />
        </fieldset>
        
        <fieldset data-legend="Licenses:">
            <div data-repeat="${licenseList}" data-value="${technology.licenses}">
                <input type="checkbox" value="${var.value}" data-label="${var.name}" />
            </div>
        </fieldset>

        <fieldset data-legend="Status:">
            <select data-repeat="${statusList}" data-value="${technology.status}" 
                data-empty-option="Select a status" data-error="true">
                <option value="${var.value}">${var.name}</option>
            </select>
        </fieldset>
        
        <fieldset data-legend="Required:">
            <div data-repeat="${'true,false'.split(',')}" data-value="${empty technology ? true : technology.required}">
                <input type="radio" value="${var}" data-label="${var ? 'Yes' : 'No'}" />
            </div>
        </fieldset>
        
        <button>Save</button>
        
    </form>
    
</html>